﻿<UserControl x:Class="HeritageAcademy.Library.Controls.TestWizard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:HeritageAcademy.Library.Controls"
             xmlns:Model="clr-namespace:HeritageAcademy.Models.Loaders;assembly=HeritageAcademy.Models"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             d:DesignHeight="360" d:DesignWidth="420">
    
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition/>
    		<RowDefinition Height="50"/>
    	</Grid.RowDefinitions>

        <Border Grid.Row="1">
        	<Border.Background>
        		<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
        			<GradientStop Color="#00000000" Offset="0" />
        			<GradientStop Color="#18000000" Offset="1" />
        		</LinearGradientBrush>
        	</Border.Background>
        </Border>
        
        <Grid Margin="18,18,18,0">
        	<Border Background="{DynamicResource PageBackgroundBrush}" IsHitTestVisible="False">
        		<Border.Effect>
        			<DropShadowEffect Direction="-90" BlurRadius="12" ShadowDepth="3" Opacity="0.4" />
        		</Border.Effect>
        	</Border>
            <Frame x:Name="frmPage" Source="{Binding CurrentPage.Source}" NavigationUIVisibility="Hidden" Focusable="False" Margin="20" />
        </Grid>
        
        <!-- Bottom Navigation -->
        <Grid x:Name="BottomNavigation" Grid.Row="1" SnapsToDevicePixels="True" Height="Auto">
                
        	<Grid.Style>
        		<Style TargetType="{x:Type Grid}">
        			<!-- for TouchScreens
                        <Style.Triggers>
                        	<DataTrigger Binding="{Binding IsTouchResizeEnabled, Source={x:Static ViewModel:OptionsViewModel.Current}}" Value="True">
                        		<Setter Property="Height" Value="46" />
                        	</DataTrigger>
                        </Style.Triggers>-->
        			<Setter Property="Height" Value="40" />
        		</Style>
        	</Grid.Style>

        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="0.3*" />
        		<ColumnDefinition Width="100" />
        		<ColumnDefinition Width="0.3*" />
        	</Grid.ColumnDefinitions>
            
            <!-- Position info panel -->
        	<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" d:IsHidden="True" Grid.Column="1" VerticalAlignment="Center" >
                <TextBlock x:Name="tbCurrentPageNumber" TextWrapping="Wrap" Text="{Binding CurrentPage.Number}" HorizontalAlignment="Left" VerticalAlignment="Center" TextOptions.TextFormattingMode="Display"/>
                <TextBlock Text="из" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="6,0" TextOptions.TextFormattingMode="Display"/>
                <TextBlock x:Name="tbAllPagesNumber" TextWrapping="Wrap" Text="{Binding PageCount}" HorizontalAlignment="Left" VerticalAlignment="Center" TextOptions.TextFormattingMode="Display"/>
            </StackPanel>

            <!-- Next Page Button -->
            <RepeatButton x:Name="NextPageButton" Grid.Column="2" Style="{DynamicResource OpacityRepeatButton}" Focusable="False" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" Cursor="Hand" Padding="0,0,18,0" ToolTip="Следующий вопрос" Command="{Binding MoveNextCommand}">
        		<local:Bitmap Source="/HeritageAcademy.Library;component/Images/arrow_next.png" />
        	</RepeatButton>

            <!-- Previous Page Button -->
            <RepeatButton x:Name="PreviousPageButton" Grid.Column="0" Style="{DynamicResource OpacityRepeatButton}" Focusable="False" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Cursor="Hand" Padding="18,0,0,0" ToolTip="Предыдущий вопрос" Command="{Binding MovePreviousCommand}">
        		<local:Bitmap Source="/HeritageAcademy.Library;component/Images/arrow_prev.png" />
        	</RepeatButton>

        </Grid>

        <!-- Timer -->
        <local:DigitalTimer x:Name="dtDurationTime" VerticalAlignment="Top" Margin="0,-30,0,0" HorizontalAlignment="Center" FontSize="14"/>
    </Grid>
</UserControl>
